package com.accountant.travelaccountant;

import android.app.Activity;
import android.view.View;
import android.widget.GridView;

public class HelperClassForActivities extends Activity {
	Activity activity;

	/* Function so that the list view comes alternately coloured */
	public static View addColourToListView(int position, View convertView,
			Activity activity) {
		if (position % 2 == 0)
			convertView.setBackgroundColor(activity.getResources().getColor(
					R.color.List_First_Row_Colour));
		else
			convertView.setBackgroundColor(activity.getResources().getColor(
					R.color.List_Next_Row_Colour));
		return convertView;
	}

	/* Function so that the list view comes alternately coloured */
	public static void addColourToGridView(GridView gridView,Activity activity) {
		gridView.setBackgroundColor(activity.getResources().getColor(R.color.Grid_Row_Color));
	}

}
